

export type defaultValueType = {
    value: any;
    desc: string;
    editable: boolean;
};

// 右键菜单
export type contextmenuType = {
    show: boolean,
    data: Array<contextmenuData>;
    event?: MouseEvent | undefined,
    /* 临时数据 */
    tempData:any
};
export type contextmenuData = {
    [x: string]: any;
    text: string;
    /* 菜单里要执行的函数 */
    event: (...data: any) => any;
    icon?: any,
    children?: Array<contextmenuData>,
    expand?: Boolean;
}

/* 候选值的类型 */
export type valueTypes = "number" | "string" | "array"



export type treeType = {
    id: string,
    title: string,
    children: Array<treeType>,
    type: "folder" | "file" | "props",
    [key: string]: any,
    editable?: boolean,
    expand?: boolean
}
/* 字段类型 */
export type fileType = {
    /* 是否激活 */
    active: boolean;
    /* 描述信息 */
    desc: string,
    /* 编辑模式 */
    editable: boolean,
    [key: string]: any,
} & treeType

export type propsType = {
    /* 描述信息 */
    desc: string;
    /* 值 */
    value: any;
    defaultValueList: Array<defaultValueType>,
    valueType: string,
    /* 校验规则 */
    [key: string]: any,
}
/* 字典类型 */
export type dictionaryType = {
    key: string,
    value: any,
    desc: string,
    id: string
}
/* 字典组 */
export type dictionaryGroupType = {
    desc: string,
    title:string,
    children:Array<dictionaryType>,
    id:string,
}

export type kvType={
    key:string,
    value:string
}